<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>字符处理</title>
</head>
<body>
    
    <script>
        /*
        * 输入'hello,world' --- 'h','e'....
        */
        function specify(str){
            var ary = str.split('');
            for(var i=0;i<ary.length;i++){
                if(ary[i] == ","){
                    var index = i;
                    ary.splice(index,1);
                    break;
                }
            }
            return ary.join(',');
        

        }

        console.log(specify('hello,world'));
    </script>
</body>
</html>